package Market.CBD;

import java.util.Map;

import org.apache.kafka.common.serialization.Serializer;

import Market.CBD.CBDMarketDataOuterClass.CBDMarketData;;

public class DataSer implements Serializer<CBDMarketData> {
    private String encoding;

    public void configure(Map<String, ?> configs, boolean isKey) {

    }

    public byte[] serialize(String topic, CBDMarketData data) {
//        try {
        return data == null ? null : data.toByteArray();
//        } catch (UnsupportedEncodingException var4) {
//            throw new SerializationException("Error when serializing string to byte[] due to unsupported encoding " + this.encoding);
//        }
    }
}